Repository navigation
test: move unittest.main() guards to end of file in both suites (#5712) - #5726
Merged
Merged
Conversation
Direct-script runs silently skipped every test class defined after the mid-file guard: test_cold_store.py ran 109 of 112 tests and test_update_nixpkgs_inputs.py ran 9 of 14. Moving each guard to end of file makes direct runs execute the full suite; discover counts and outcomes are unchanged. Verified on the laptop: direct runs now report 112 (OK, skipped=1) and 14 tests. The 2 failures in the nixpkgs-inputs suite (TestDiscoverInputs.test_current_flake_lock_keeps_the_four_intended_inputs, root + pkgs/id copies) are pre-existing on clean main and filed as #5725.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5712 · Queue task 9769
What
Moves the mid-file
if __name__ == "__main__": unittest.main()guard to the end of file in both suites — a pure move, no test content changed:pkgs/cold-store-reaper/tests/test_cold_store.py(guard was at line 3223 of 3289, beforeTestResumableUploadStalls)scripts/tests/test_update_nixpkgs_inputs.py(guard was at line 377 of 680, before the later import block and the fix(scripts): gate nixpkgs-unstable input updates on the Hydra channel (cached) revision #4553 section)Direct-script runs previously executed
unittest.main()at the guard, silently skipping every test class defined after it.Verification (laptop, worktree at origin/main 03032fd)
python3 pkgs/cold-store-reaper/tests/test_cold_store.py→ Ran 112 tests, OK (skipped=1) (was 109)python3 scripts/tests/test_update_nixpkgs_inputs.py→ Ran 14 tests (was 9), including TestHydraGateParsing, TestGatedPinEndToEnd, TestHttpsContextTestDiscoverInputs.test_current_flake_lock_keeps_the_four_intended_inputs, copies root + pkgs/id) are pre-existing on clean main (reproduced on the untouched primary clone) and are filed separately as test_update_nixpkgs_inputs: TestDiscoverInputs flake_lock test fails on main (root + pkgs/id copies) #5725 — not caused by this change.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.